﻿define(['ajax'], function (ajax) {
    "use strict";

    var exports = {},
         ViewModel ;

   ViewModel = function (){
       $.subscribe('memberPicked', function(member) {
           alert(member.name());
           $.publish('hidePicker');
       });
    };
    
    exports.exec = function (sectionId) {
        var viewModel = new ViewModel();
        ko.applyBindings(viewModel, document.getElementById(sectionId));
    };

    return exports;
});

